import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * ${table.comment}
 * </p>
 *
 * @author ${author}
 * @since ${date?date}
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("${table.name}")
public class ${entity} extends Model<${entity}> implements Serializable {

    private static final long serialVersionUID = 1L;

<#list table.fields as field>
    <#if field.keyFlag>
    /**
     * 主键
     */
    @TableId(value = "${field.name}", type = IdType.AUTO)
    private ${field.propertyType} id;
    <#elseif !field.keyFlag>
    /**
     * ${field.comment}
     */
    @TableField("${field.name}")
    <#if field.propertyType == "LocalDateTime">
    private Date ${field.propertyName};
    </#if>
    <#if field.propertyType != "LocalDateTime">
    private ${field.propertyType} ${field.propertyName};
    </#if>
    </#if>
</#list>
}
